<?php

namespace Library\Checker;

class EmailChecker implements \Library\Checker {

	public static function check( $email ) {
		if( !$email ) {
			return 'Email required';
		}
		
		if( preg_match( '/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/', $email ) ) {
			return 'Invalid email';
		}

		return true;
	}
}
